package top.tagao.yygh.statistics.controller;

import com.sun.corba.se.spi.orbutil.fsm.Guard;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.tagao.yygh.common.result.Result;
import top.tagao.yygh.order.client.OrderFeignClient;
import top.tagao.yygh.vo.order.OrderCountQueryVo;

import java.util.Map;

/**
 * @author fu-xiao-liu
 * @Date 2022/3/16 19:20
 */
@Api(tags = "统计管理接口")
@RestController
@RequestMapping("/admin/statistics")
public class StatisticsController {
    @Autowired
    private OrderFeignClient orderFeignClient;

    @ApiOperation(value = "获取订单统计数据")
    @GetMapping("getCountMap")
    public Result getCountMap(OrderCountQueryVo orderCountQueryVo){
        Map<String, Object> map = orderFeignClient.getCountMap(orderCountQueryVo);
        return  Result.ok(map);
    }

}
